<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>住院管理信息系统</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="icon" type="image/png" href="assets/i/favicon.png">
<link rel="stylesheet" href="assets/css/amazeui.min.css">
<link rel="stylesheet" href="assets/css/app.css">
<script type="text/javascript">
	function lookid() {
		var myinput = $("#mylook").val();
		if (myinput == "") {
			alert("病历号不得为空！");
		} else {
			showchakan(myinput);
			$("#chakan").modal('close');
		}
	}
</script>
<style type="text/css">
.my ul {
	width: 270px;
}

.my li {
	width: 50%; /*如果显示三列 则width改为70px*/
	float: left;
	border-radius: 20px;
	display: block;
	border: 5px solid #E5E4E7;
}
</style>

</head>
<body>
	<!-- Header -->
	<header data-am-widget="header" class="am-header am-header-default"
		style="background: #24192B; height: 60px">
		<h1 class="am-header-title" style="font-size: 30px; padding: 5px">
			<a href="#title-link">住院管理信息系统</a>
		</h1>
	</header>

	<!-- Menu -->
	<#include "nav.html"/>

	<!-- Slider -->
	<div data-am-widget="slider" class="am-slider am-slider-a1"
		data-am-slider='{"directionNav":false}'>
		<ul class="am-slides">
			<li><img src="images/wallhaven-285191.jpg"></li>
			<li><img src="images/wp1848587.jpg"></li>
			<li><img src="images/wallhaven-314512.jpg"></li>
			<li><img src="images/wallhaven-397185.jpg"></li>
		</ul>
	</div>
	<br>


	<!-- Navbar -->
	<div data-am-widget="navbar" class="am-navbar am-cf am-navbar-default "
		id="" style="height: 80px" onmouseover="show('div')"
		onmouseout="hide('div')">
		<ul id='div' class="am-navbar-nav am-cf am-avg-sm-4"
			style="background: #24192B; height: 80px; display: none">
			<li><a href="javascript:zhuyuan()"> <span><img
						src="images/zhuyuan.png" border="0"
						style="width: 50px; height: 50px; padding: 5px" /></span> <span
					class="am-navbar-label" style="font-size: 15px;">入院</span>
			</a></li>
			<li><a href="javascript:kaiyao()"> <span><img
						src="images/kaiyao.png" border="0"
						style="width: 50px; height: 50px; padding: 5px" /></span> <span
					class="am-navbar-label" style="font-size: 15px;">开药</span>
			</a></li>
			<li><a href="javascript:jiancha()"> <span><img
						src="images/jianyan.png" border="0"
						style="width: 50px; height: 50px; padding: 5px" /></span> <span
					class="am-navbar-label" style="font-size: 15px;">检验</span>
			</a></li>
			<li><a href="javascript:chakan()"> <span><img
						src="images/chakan.png" border="0"
						style="width: 50px; height: 50px; padding: 5px" /></span> <span
					class="am-navbar-label" style="font-size: 15px;">查看</span>
			</a></li>
			<li><a href="javascript:feiyong()">
					<span><img
						src="images/feiyong.png" border="0"
						style="width: 50px; height: 50px; padding: 5px" /></span> <span
					class="am-navbar-label" style="font-size: 15px;">费用</span>
			</a></li>
			<li><a href="javascript:chuyuansearch()"> <span><img
						src="images/chuyuan.png" border="0"
						style="width: 50px; height: 50px; padding: 5px" /></span> <span
					class="am-navbar-label" style="font-size: 15px;">出院</span>
			</a></li>
		</ul>
	</div>

	<#include "ruyuan.html"/> <#include "kaiyao.html"/> <#include
	"jiancha.html"/> <#include "chuyuan.html"/>
	<#include "feiyong.html"/>

	<div class="am-modal am-modal-no-btn" tabindex="-1" id="zhuyuan">
		<div class="am-modal-dialog"
			style="width: 300px; height: 380px; border-radius: 10px;">
			<div class="am-modal-hd">
				<h3>请选择所属科室</h3>
				<a href="javascript: void(0)" class="am-close am-close-spin"
					data-am-modal-close>&times;</a>
			</div>
			<div class="my">
				<ul class="am-menu-nav sm-block-grid-1">
					<#if department ??> <#list department as d>
					<li class=""><a href="javascript:ruyuan('${d.dept_name}')">${d.dept_name}</a>
					</li> </#list> </#if>
				</ul>
			</div>
		</div>
	</div>

	<div class="am-modal am-modal-no-btn" tabindex="-1" id="chakan">
		<div class="am-modal-dialog"
			style="width: 240px; border-radius: 10px;">
			<div class="am-modal-hd">
				<h3>请输入病人病历号</h3>
				<a href="javascript: void(0)" class="am-close am-close-spin"
					data-am-modal-close>&times;</a>
			</div>
			<div class="am-form am-form-horizontal">
				<div class="am-form-group">
					<div class="am-u-sm-20">
						<input id="mylook" style="width: 200px;" type="text"
							class="am-form-field am-round" placeholder="病人病历号"
							required="required" />
					</div>
				</div>
				<div class="am-form-group">
					<div class="am-u-sm-15 am-u-sm-offset-2">
						<button class="am-btn am-btn-default" onclick="lookid()">确定</button>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div class="am-modal am-modal-alert" tabindex="-1" id="my-alert">
		<div class="am-modal-dialog" style="border-radius: 10px; width: 300px">
			<div class="am-modal-hd">提示</div>
			<div class="am-modal-bd" id="myalertbody">Hello world！</div>
			<div class="am-modal-footer">
				<span class="am-modal-btn">确定</span>
			</div>
		</div>
	</div>

	<div class="am-modal am-modal-confirm" tabindex="-1" id="my-confirm">
		<div class="am-modal-dialog"
			style="width: 300px; height: 250px; border-radius: 10px;">
			<div class="am-modal-hd">
				<h3 id="confirmtitle"></h3>
				<a href="javascript: void(0)" class="am-close am-close-spin"
					data-am-modal-close>&times;</a>
			</div>
			<h4 id="confirmbody"></h4>
			<div class="am-modal-footer">
				<span class="am-modal-btn" id="confirmdel" data-am-modal-cancel></span>
				<span class="am-modal-btn" id="confirmsure" data-am-modal-confirm></span>

			</div>
		</div>
	</div>
	<div class="am-modal am-modal-no-btn" tabindex="-1" id="chakan2">
		<div class="am-modal-dialog"
			style="width: 1000px; border-radius: 10px;">
			<div class="am-modal-hd">
				<h3>病人详细信息</h3>
				<a href="javascript: void(0)" class="am-close am-close-spin"
					data-am-modal-close>&times;</a>
			</div>
			<div id="dept1" class="am-modal-bd">
				<table
					class="am-table am-table-bordered am-table-radius am-table-striped">
					<thead>
						<tr>
							<th style="text-align: center">病历号</th>
							<th style="text-align: center">姓名</th>
							<th style="text-align: center">性别</th>
							<th style="text-align: center">症状</th>
							<th style="text-align: center">主管医生</th>
							<th style="text-align: center">医生职称</th>
							<th style="text-align: center">所属科室</th>
							<th style="text-align: center">病房号</th>
							<th style="text-align: center">病床号</th>
							<th style="text-align: center">入院时间</th>
							<th style="text-align: center">出院时间</th>
						</tr>
					</thead>
					<tbody id="p_all">

					</tbody>
				</table>
			</div>
		</div>
	</div>

	<script type="text/javascript">
		function showchakan(p_id) {
			$("#p_all").html("");
			$
					.post(
							'${ctx}/main/patientAll',
							{
								"p_id" : p_id
							},
							function(p_data) {
								var len = p_data.p_data.length;
								for (var i = 0; i < len; i++) {
									$("#p_all")
											.append(
													"<tr>" + "<td>"
															+ p_data.p_data[i].M_ID
															+ "</td>"
															+ "<td>"
															+ p_data.p_data[i].P_NAME
															+ "</td>"
															+ "<td>"
															+ p_data.p_data[i].SEX
															+ "</td>"
															+ "<td>"
															+ p_data.p_data[i].DIAGNOSIS
															+ "</td>"
															+ "<td>"
															+ p_data.p_data[i].D_NAME
															+ "</td>"
															+ "<td>"
															+ p_data.p_data[i].POSITION
															+ "</td>"
															+ "<td>"
															+ p_data.p_data[i].DEPT_NAME
															+ "</td>"
															+ "<td>"
															+ p_data.p_data[i].W_ID
															+ "</td>"
															+ "<td>"
															+ p_data.p_data[i].BED_ID
															+ "</td>"
															+ "<td>"
															+ p_data.p_data[i].IN_TIME
															+ "</td>"
															+ "<td>"
															+ (p_data.p_data[i].OUT_TIME == null ? '未出院'
																	: p_data.p_data[i].OUT_TIME)
															+ "</td>" + "</tr>");
								}
								$("#chakan2").modal('open');
							}, 'json');

		}

		function zhuyuan() {
			$("#zhuyuan").modal('open');
		}

		function chakan() {
			$("#chakan").modal('open');
		}
	</script>
	<script>
		function show(n) {
			document.getElementById(n).style.display = "block";
		}
		function hide(n) {
			document.getElementById(n).style.display = "none";
		}
	</script>
	<script src="assets/js/jquery.min.js"></script>
	<script src="assets/js/amazeui.min.js"></script>
</body>
</html>
